<?php

namespace App\Models;

use App\MongoBaseModel as Model;
use App\Services\AdminService;
use Faker\Provider\DateTime;
use \Services;

/**
 * Class Project
 * @package  App\Models
 * @property string id
 * @property string group_id    所属组织的ID
 * @property string start_time  项目开始时间
 * @property string end_time    项目结束时间
 * @property string type        项目类型
 * @property string title       项目名称
 * @property int    users       项目负责的操作员
 * @property string status      项目审核状态
 * @property string wx_id       关联的微信号id
 * @property array plugins
 * <code>
 * [
 *   shihui: [
 *      "key": "SH0001",
 *      "title": "xxxxx服务社",
 *   ],
 * ]
 * </code>
 */
class Project extends Model
{
    protected $fillable = [
        'group_id',
        'start_time',
        'end_time',
        'type',
        'title',
        'users',
        'plugins',
        'logs',
        'status',
        'wx_id',
    ];

    public function wxClients() {
        return $this->hasMany(WxClient::class);
    }
}
